package demo1;


public class A {
    static private int a = 10;
    int b = 20;
    protected int c = 30;
    public int d = 40;

    public A() {
        fun();
    }

    public static void main(String[] args) {
        B b = new B();
    }

    public void fun(){
        System.out.println("AFun()");
    }
}

class B extends A{
    int num = 10;

    @Override
    public void fun() {
        System.out.println("BFun()" + num);
    }
}
